<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        var obj ={
        }
        obj.name = 'jack';
        obj.sayHi = function () {
            console.log('say hi');
        }
        console.log(obj.name);
        obj.sayHi()

        obj.name = 'mr马';
        console.log(obj.name);

        delete obj.name;
        console.log(obj.name);
        
        var obj2 = new Object();
        obj2['name'] = 'andy';
        console.log(obj2['name']);
        
        obj2['sayHi'] = function () {
            console.log('obj2 say hi');   
        }
        obj2['sayHi']();

        obj2['name'] = '老周'
        console.log(obj2['name']);

        delete obj2['name'];
        console.log(obj2['name']);
        
        
        
        
        
        
    </script>
</head>
<body>
    
</body>
</html>